.class public Lrexsee/core/transportation/RexseeUpload;
.super Ljava/lang/Object;
.source "RexseeUpload.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;
    }
.end annotation


# static fields
.field public static final BOUNDARY:Ljava/lang/String; = "*****"

.field public static final DOUBLEHYPHENS:Ljava/lang/String; = "--"

.field public static final EVENT_ONUPLOADFILESELECTED:Ljava/lang/String; = "onUploadFileSelected"

.field public static final EVENT_ONUPLOADFILESELECTIONFAILED:Ljava/lang/String; = "onUploadFileSelectionFailed"

.field public static final EVENT_ONUPLOADFINISHED:Ljava/lang/String; = "onUploadFinished"

.field public static final EVENT_ONUPLOADPROGRESSCHANGED:Ljava/lang/String; = "onUploadProgressChanged"

.field public static final EVENT_ONUPLOADSFINISHED:Ljava/lang/String; = "onUploadsFinished"

.field public static final EVENT_ONUPLOADTIMEOUT:Ljava/lang/String; = "onUploadTimeout"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "Upload"

.field public static final LINEEND:Ljava/lang/String; = "\r\n"

.field public static final UPLOAD_PROGRESS_CONNECTING:I = -0x1

.field public static final UPLOAD_PROGRESS_DONE:I = 0x1

.field public static final UPLOAD_PROGRESS_EXCEPTION:I = -0x3

.field public static final UPLOAD_PROGRESS_FINISHED:I = 0x2

.field public static final UPLOAD_PROGRESS_ONGOING:I = 0x0

.field public static final UPLOAD_PROGRESS_TIMEOUT:I = -0x2


# instance fields
.field protected final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field public final selectedFiles:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private uploadIndex:I


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 69
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 62
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    .line 66
    const/4 v0, -0x1

    iput v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    .line 70
    iput-object p1, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    .line 71
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mContext:Landroid/content/Context;

    .line 72
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadFileSelected"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 73
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadFileSelectionFailed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 74
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadProgressChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 75
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadFinished"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 76
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadTimeout"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 77
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadsFinished"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 78
    return-void
.end method

.method static synthetic access$0(Lrexsee/core/transportation/RexseeUpload;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 64
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/core/transportation/RexseeUpload;I)V
    .locals 0

    .prologue
    .line 66
    iput p1, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    return-void
.end method


# virtual methods
.method public append(Ljava/lang/String;)V
    .locals 2
    .param p1, "type"    # Ljava/lang/String;

    .prologue
    .line 232
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->fileSelector:Lrexsee/core/browser/clazz/FileSelector;

    new-instance v1, Lrexsee/core/transportation/RexseeUpload$2;

    invoke-direct {v1, p0}, Lrexsee/core/transportation/RexseeUpload$2;-><init>(Lrexsee/core/transportation/RexseeUpload;)V

    invoke-virtual {v0, p1, v1}, Lrexsee/core/browser/clazz/FileSelector;->selectByDefault(Ljava/lang/String;Lrexsee/core/browser/clazz/FileSelector$FileSelecteListener;)V

    .line 243
    return-void
.end method

.method public clear()V
    .locals 1

    .prologue
    .line 256
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 257
    const/4 v0, -0x1

    iput v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    .line 258
    return-void
.end method

.method public contains(Ljava/lang/String;)Z
    .locals 1
    .param p1, "path"    # Ljava/lang/String;

    .prologue
    .line 225
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public get()Ljava/lang/String;
    .locals 6

    .prologue
    const-string v5, "\""

    .line 245
    const-string v1, ""

    .line 246
    .local v1, "rtn":Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    iget-object v2, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lt v0, v2, :cond_0

    .line 249
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "["

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "]"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2

    .line 247
    :cond_0
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    if-nez v0, :cond_1

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v2, "\""

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v4, "\""

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    :goto_1
    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 246
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 247
    :cond_1
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v2, ",\""

    invoke-direct {v4, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v4, "\""

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto :goto_1
.end method

.method public get(I)Ljava/lang/String;
    .locals 1
    .param p1, "index"    # I

    .prologue
    .line 252
    if-ltz p1, :cond_0

    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lt p1, v0, :cond_1

    :cond_0
    const-string v0, ""

    .line 253
    .end local p0    # "this":Lrexsee/core/transportation/RexseeUpload;
    :goto_0
    return-object v0

    .restart local p0    # "this":Lrexsee/core/transportation/RexseeUpload;
    :cond_1
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0    # "this":Lrexsee/core/transportation/RexseeUpload;
    check-cast p0, Ljava/lang/String;

    move-object v0, p0

    goto :goto_0
.end method

.method public getCurrentIndex()I
    .locals 1

    .prologue
    .line 260
    iget v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    return v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 33
    new-instance v0, Lrexsee/core/transportation/RexseeUpload;

    invoke-direct {v0, p1}, Lrexsee/core/transportation/RexseeUpload;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 29
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Upload"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 37
    new-instance v0, Lrexsee/core/transportation/RexseeUpload;

    invoke-direct {v0, p1}, Lrexsee/core/transportation/RexseeUpload;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public select(Ljava/lang/String;)V
    .locals 0
    .param p1, "type"    # Ljava/lang/String;

    .prologue
    .line 228
    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->clear()V

    .line 229
    invoke-virtual {p0, p1}, Lrexsee/core/transportation/RexseeUpload;->append(Ljava/lang/String;)V

    .line 230
    return-void
.end method

.method public size()I
    .locals 1

    .prologue
    .line 222
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public upload(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .param p1, "action"    # Ljava/lang/String;
    .param p2, "name"    # Ljava/lang/String;

    .prologue
    .line 264
    const/4 v0, 0x1

    invoke-virtual {p0, p1, p2, v0}, Lrexsee/core/transportation/RexseeUpload;->upload(Ljava/lang/String;Ljava/lang/String;Z)V

    .line 265
    return-void
.end method

.method public upload(Ljava/lang/String;Ljava/lang/String;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;)V
    .locals 10
    .param p1, "action"    # Ljava/lang/String;
    .param p2, "name"    # Ljava/lang/String;
    .param p3, "progressListener"    # Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;

    .prologue
    .line 81
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 82
    .local v4, "uploadUrl":Ljava/lang/String;
    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v0}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v8

    .line 83
    .local v8, "scheme":Ljava/lang/String;
    const-string v0, "http"

    invoke-virtual {v8, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "https"

    invoke-virtual {v8, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 84
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":Wrong Scheme!"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 217
    :goto_0
    return-void

    .line 87
    :cond_0
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->domainWhiteList:Lrexsee/core/browser/clazz/DomainWhiteList;

    invoke-virtual {v0, v4}, Lrexsee/core/browser/clazz/DomainWhiteList;->isValidUrl(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 88
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":Url not allowed."

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 91
    :cond_1
    if-nez p3, :cond_2

    .line 92
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":Progress listener could not be null."

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 95
    :cond_2
    const-string v0, "mounted"

    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    .line 96
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    const-string v2, "SD card is not ready."

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 99
    :cond_3
    iget v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    .line 100
    iget v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    iget-object v1, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-lt v0, v1, :cond_4

    .line 101
    const/4 v0, -0x1

    iput v0, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    .line 102
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onUploadsFinished"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    goto :goto_0

    .line 104
    :cond_4
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->selectedFiles:Ljava/util/ArrayList;

    iget v1, p0, Lrexsee/core/transportation/RexseeUpload;->uploadIndex:I

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 105
    .local v3, "path":Ljava/lang/String;
    const-string v0, "/"

    invoke-virtual {v3, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {v3, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v6

    .line 106
    .local v6, "fileName":Ljava/lang/String;
    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v9

    .line 107
    .local v9, "uri":Landroid/net/Uri;
    invoke-virtual {v9}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v0

    const-string v1, "file"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5

    .line 108
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":Invalid scheme."

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_0

    .line 111
    :cond_5
    new-instance v7, Ljava/io/File;

    invoke-virtual {v9}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v7, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 112
    .local v7, "file":Ljava/io/File;
    invoke-virtual {v7}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_6

    invoke-virtual {v7}, Ljava/io/File;->isFile()Z

    move-result v0

    if-nez v0, :cond_7

    .line 113
    :cond_6
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":File not found."

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_0

    .line 116
    :cond_7
    invoke-virtual {v7}, Ljava/io/File;->canRead()Z

    move-result v0

    if-nez v0, :cond_8

    .line 117
    iget-object v0, p0, Lrexsee/core/transportation/RexseeUpload;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/transportation/RexseeUpload;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ":File not readable."

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_0

    .line 120
    :cond_8
    new-instance v0, Lrexsee/core/transportation/RexseeUpload$1;

    move-object v1, p0

    move-object v2, p3

    move-object v5, p2

    invoke-direct/range {v0 .. v7}, Lrexsee/core/transportation/RexseeUpload$1;-><init>(Lrexsee/core/transportation/RexseeUpload;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V

    .line 215
    invoke-virtual {v0}, Lrexsee/core/transportation/RexseeUpload$1;->start()V

    goto/16 :goto_0
.end method

.method public upload(Ljava/lang/String;Ljava/lang/String;Z)V
    .locals 1
    .param p1, "action"    # Ljava/lang/String;
    .param p2, "name"    # Ljava/lang/String;
    .param p3, "cancelable"    # Z

    .prologue
    .line 267
    new-instance v0, Lrexsee/core/transportation/RexseeUpload$3;

    invoke-direct {v0, p0, p3}, Lrexsee/core/transportation/RexseeUpload$3;-><init>(Lrexsee/core/transportation/RexseeUpload;Z)V

    invoke-virtual {p0, p1, p2, v0}, Lrexsee/core/transportation/RexseeUpload;->upload(Ljava/lang/String;Ljava/lang/String;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;)V

    .line 299
    return-void
.end method

.method public uploadWithCallback(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .param p1, "action"    # Ljava/lang/String;
    .param p2, "name"    # Ljava/lang/String;

    .prologue
    .line 301
    new-instance v0, Lrexsee/core/transportation/RexseeUpload$4;

    invoke-direct {v0, p0}, Lrexsee/core/transportation/RexseeUpload$4;-><init>(Lrexsee/core/transportation/RexseeUpload;)V

    invoke-virtual {p0, p1, p2, v0}, Lrexsee/core/transportation/RexseeUpload;->upload(Ljava/lang/String;Ljava/lang/String;Lrexsee/core/transportation/RexseeUpload$UploadProgressListener;)V

    .line 307
    return-void
.end method
